package com.dao;

import com.bean.Message;

import java.sql.SQLException;
import java.util.List;

public interface MessageDAO {

    /**
     * BeanListHandler将结果列表封装
     * @return
     * @throws SQLException
     */

     List<Message> selectAll() throws SQLException ;

     List<Message> selectByName(String userId) throws SQLException ;

     boolean deleteById(Integer id) throws SQLException ;


     boolean insert(Message m) throws SQLException ;

    /**
     * ScalarHandler用来将单个Object类型封装
     * @return
     * @throws SQLException
     */
     Integer count() throws SQLException ;

     Integer countSearch(String search) throws SQLException ;

     List<Message> selectAllPagination(Integer offset, Integer limit) throws SQLException ;

     List<Message> selectAllPaginationSearch(Integer offset, Integer limit, String search) throws SQLException ;

}
